unit uDefs.local;

interface

const
  DATA_FILE = 'data\2010.txt';

  MAX_LAPS_ALLOWED     = 78;
  MAX_DISTANCE_ALLOWED = 320; //KM

  FUEL_PERKM_DELAY     = 0.01517; //Seconds

  FUEL_LITRE_KG   = 0.734;
  FUEL_KG_L       = 1.36;
  FUEL_USE_L_KM   = 1.3;
  FUEL_USE_KM_L   = 0.769;

  FUEL_TIME_KG    = 0.03;   // Seconds
  FUEL_TIME_LITRE = FUEL_TIME_KG * FUEL_KG_L;//0.0544; // Seconds

  FUEL_PUMP       = 12; //Litres per second

  TYRE_WEAR_KM    = 0.2;//0.175; // Tyre wear per KM


//Session Status
  SESSION_PRACTICE1 = 'PRACTICE 1';
  SESSION_PRACTICE2 = 'PRACTICE 2';
  SESSION_PRACTICE3 = 'PRACTICE 3';
  SESSION_QUALIFY   = 'QUALIFY';
  SESSION_RACE      = 'RACE';
  SESSION_PODIUM    = 'PODIUM';

  LAPS_PRACTICE1 = 20;
  LAPS_PRACTICE2 = 20;
  LAPS_PRACTICE3 = 20;
  LAPS_QUALIFY   = 15;

  MAX_WEATHER       = 100;

type
  TStatus = (STATUS_RACING, STATUS_PIGEON, STATUS_DIRTYAIR,
             STATUS_SLIPSTREAM, STATUS_BOOST, STATUS_PIT,
             STATUS_PITTING, STATUS_RETIRED, STATUS_GRID,
             STATUS_MECHANICAL, STATUS_PUNCTURE, STATUS_STALLED,
             STATUS_SPIN, STATUS_OFFROAD, STATUS_PENALTY, STATUS_CRASH,
             STATUS_CRASHING, STATUS_OUTLAP, STATUS_FUEL, STATUS_TYRES,
             STATUS_LOCKUP, STATUS_PITERROR
             );

  TRaceStatus = set of TStatus;

  TFastestLap = class( TObject )
  public
    ID   : integer;
    Time : real;
    Lap  : integer;

    procedure SetTime(nID,nLap:integer;nTime:real);
  end;

implementation

  //================================ FATESTLAP
procedure TFastestLap.SetTime(nID,nLap:integer;nTime:real);
begin
  ID   := nID;
  Time := nTime;
  Lap  := nLap;
end;

end.
